package com.example.mapper;

import com.example.entity.po.Employee;
import com.example.entity.vo.EmployeeVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author hongyi
 * @date 2024/8/24 16:25
 */
public interface EmployeeMapper {
    /**
     * 新增
     */
    int insert(Employee employee);

    /**
     * 删除
     */
    int deleteById(Integer id);

    /**
     * 修改
     */
    int updateById(Employee employee);

    /**
     * 根据ID查询
     */
    Employee selectById(Integer id);

    /**
     * 查询所有
     */
    List<EmployeeVo> selectAll(Employee employee);

    @Select("select * from employee where name = #{name}")
    Employee selectByUsername(String name);}
